import request from '@/router/axios';
import { baseUrl } from '@/config/env';

export const listRole = (data) => request({
    url: baseUrl + '/system/role/list',
    method: 'get',
    params: data
});

export const addRole = (data) => request({
    url: baseUrl + '/system/role',
    method: 'post',
    data:data
});

export const updateRole = (data) => request({
    url: baseUrl + '/system/role',
    method: 'put',
    data:data
});

export const deleteRole = (roleId) => request({
    url: baseUrl + '/system/role/'+roleId,
    method: 'delete'
});

export const configRolePer = (data) => request({
    url: baseUrl + '/system/role/configRolePer',
    method: 'post',
    data:data
});